package com.opentae.data.mall.interfaces;

import com.opentae.core.mybatis.config.MyBatisRepository;
import com.opentae.core.mybatis.mapper.Mapper;
import com.opentae.data.mall.beans.MallBonus;
import com.opentae.data.mall.pojo.BonusReportVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;

import java.util.Date;
import java.util.List;

/**
 * 
 * Created by exampleCreater.
 */
@MyBatisRepository("tae_mall_mallBonusMapper")
@Scope("singleton")
@Lazy(true)
public interface MallBonusMapper extends Mapper<MallBonus> {


    /**
     * @description 查询订单的分润
     *  mall_bonus.status = 0 (表示该数据未进行操作的)
     * @author 郭尔
     * @date 2019-06-17 12:39
     */
    MallBonus selTradeBonus(@Param("tradeCode")String tradeCode);

    /**
     *
     * @description
     * @author 郭尔
     * @date 2019-06-18 13:02
     */
    Double selAchive(@Param("userId")Long userId,@Param("level")Integer level);


    /**
     *
     * @description 查询每日的奖励发放数据
     * @param type 1已发货的  2未发货的
     * @author 郭尔
     * @date 2019-11-21 13:18
     */
    BonusReportVo selBonusData(@Param("start") Date start ,@Param("end")Date end,@Param("type")Integer type);

}
